/**
 * @file StreamAnalyzer.h
 *
 * This file defines the global parameters, variables, types... for the application.
 *
 * @author Luc Fourestier
 * @date 2009
 */

#ifndef StreamAnalyzer_H_
#define StreamAnalyzer_H_

#include <stddef.h>

#include "Streamer.h"

#include "Version.h"
#ifndef VERSION
#define VERSION "Unversionned"
#endif

// Strings
#define MAX_NAME_LENGTH 256

// Default circular buffer config
#define MAX_CIRCBUFF_ELT 2000

// Internet
#define IP_ADDR_LENGTH 16


// Globals
extern char * Version;

/**
 * The StreamAnalyzer info structure
 */
typedef struct StreamAnalyzer_s
{
	char ErrorString[MAX_NAME_LENGTH];			//!< The error string that can be read in a debugger
	char OwnInetAddr[IP_ADDR_LENGTH];			//!< Our own IP address
	char Address[IP_ADDR_LENGTH];  				//!< The address to analyze
	unsigned int Port;  				    	//!< The port
	char InputFileName[MAX_NAME_LENGTH];  	    //!< The name of the input file to analyze
	char JitterFileName[MAX_NAME_LENGTH];  	    //!< The name of the jitter file
	char DumpFileName[MAX_NAME_LENGTH];  	    //!< The name of the dump file
	char TableFileName[MAX_NAME_LENGTH];  	    //!< The name of the SI table file
	SA_StreamAnalyzer_t * SA;					//!< The StreamAnalyzer
	SR_StreamReader_t * SR;						//!< The StreamReader
	SP_StreamPlayer_t * SP;						//!< The StreamPlayer
} StreamAnalyzer_t;

extern StreamAnalyzer_t StreamAnalyzer;

#endif /* StreamAnalyzer_H_ */
